.class public Lcom/xingbook/paint/a/a;
.super Ljava/lang/Object;

# interfaces
.implements Lcom/xingbook/paint/a/a/a;
.implements Lcom/xingbook/paint/a/a/c;


# instance fields
.field protected a:Landroid/graphics/Paint;

.field protected b:Lcom/xingbook/paint/c/b;

.field protected c:Lcom/xingbook/paint/a/a/d;

.field protected d:I

.field protected e:Landroid/graphics/Paint$Style;

.field private f:F

.field private g:F

.field private h:Landroid/graphics/Path;

.field private i:Z


# direct methods
.method public constructor <init>(IILandroid/graphics/Paint$Style;)V
    .locals 2

    const/4 v0, 0x0

    const/4 v1, 0x0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput v0, p0, Lcom/xingbook/paint/a/a;->f:F

    iput v0, p0, Lcom/xingbook/paint/a/a;->g:F

    iput-object v1, p0, Lcom/xingbook/paint/a/a;->h:Landroid/graphics/Path;

    iput-object v1, p0, Lcom/xingbook/paint/a/a;->a:Landroid/graphics/Paint;

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/xingbook/paint/a/a;->i:Z

    iput-object v1, p0, Lcom/xingbook/paint/a/a;->b:Lcom/xingbook/paint/c/b;

    iput-object v1, p0, Lcom/xingbook/paint/a/a;->c:Lcom/xingbook/paint/a/a/d;

    invoke-virtual {p0, p1, p2, p3}, Lcom/xingbook/paint/a/a;->a(IILandroid/graphics/Paint$Style;)V

    new-instance v0, Lcom/xingbook/paint/c/b;

    invoke-direct {v0}, Lcom/xingbook/paint/c/b;-><init>()V

    iput-object v0, p0, Lcom/xingbook/paint/a/a;->b:Lcom/xingbook/paint/c/b;

    new-instance v0, Lcom/xingbook/paint/b/c;

    invoke-direct {v0, p0}, Lcom/xingbook/paint/b/c;-><init>(Lcom/xingbook/paint/a/a/c;)V

    iput-object v0, p0, Lcom/xingbook/paint/a/a;->c:Lcom/xingbook/paint/a/a/d;

    new-instance v0, Landroid/graphics/Path;

    invoke-direct {v0}, Landroid/graphics/Path;-><init>()V

    iput-object v0, p0, Lcom/xingbook/paint/a/a;->h:Landroid/graphics/Path;

    return-void
.end method

.method private d(FF)V
    .locals 1

    iget-object v0, p0, Lcom/xingbook/paint/a/a;->b:Lcom/xingbook/paint/c/b;

    iput p1, v0, Lcom/xingbook/paint/c/b;->a:F

    iget-object v0, p0, Lcom/xingbook/paint/a/a;->b:Lcom/xingbook/paint/c/b;

    iput p2, v0, Lcom/xingbook/paint/c/b;->b:F

    return-void
.end method

.method private e(FF)V
    .locals 0

    iput p1, p0, Lcom/xingbook/paint/a/a;->f:F

    iput p2, p0, Lcom/xingbook/paint/a/a;->g:F

    return-void
.end method

.method private f(FF)Z
    .locals 3

    const/high16 v2, 0x4080

    iget v0, p0, Lcom/xingbook/paint/a/a;->f:F

    sub-float v0, p1, v0

    invoke-static {v0}, Ljava/lang/Math;->abs(F)F

    move-result v0

    iget v1, p0, Lcom/xingbook/paint/a/a;->g:F

    sub-float v1, p2, v1

    invoke-static {v1}, Ljava/lang/Math;->abs(F)F

    move-result v1

    cmpl-float v0, v0, v2

    if-gez v0, :cond_0

    cmpl-float v0, v1, v2

    if-gez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method private g(FF)V
    .locals 6

    const/high16 v5, 0x4000

    iget-object v0, p0, Lcom/xingbook/paint/a/a;->h:Landroid/graphics/Path;

    iget v1, p0, Lcom/xingbook/paint/a/a;->f:F

    iget v2, p0, Lcom/xingbook/paint/a/a;->g:F

    iget v3, p0, Lcom/xingbook/paint/a/a;->f:F

    add-float/2addr v3, p1

    div-float/2addr v3, v5

    iget v4, p0, Lcom/xingbook/paint/a/a;->g:F

    add-float/2addr v4, p2

    div-float/2addr v4, v5

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Path;->quadTo(FFFF)V

    return-void
.end method


# virtual methods
.method public a()Landroid/graphics/Path;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/paint/a/a;->h:Landroid/graphics/Path;

    return-object v0
.end method

.method public a(FF)V
    .locals 1

    invoke-direct {p0, p1, p2}, Lcom/xingbook/paint/a/a;->d(FF)V

    iget-object v0, p0, Lcom/xingbook/paint/a/a;->h:Landroid/graphics/Path;

    invoke-virtual {v0}, Landroid/graphics/Path;->reset()V

    iget-object v0, p0, Lcom/xingbook/paint/a/a;->h:Landroid/graphics/Path;

    invoke-virtual {v0, p1, p2}, Landroid/graphics/Path;->moveTo(FF)V

    invoke-direct {p0, p1, p2}, Lcom/xingbook/paint/a/a;->e(FF)V

    return-void
.end method

.method protected a(IILandroid/graphics/Paint$Style;)V
    .locals 3

    const/4 v2, 0x1

    new-instance v0, Landroid/graphics/Paint;

    invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V

    iput-object v0, p0, Lcom/xingbook/paint/a/a;->a:Landroid/graphics/Paint;

    iget-object v0, p0, Lcom/xingbook/paint/a/a;->a:Landroid/graphics/Paint;

    int-to-float v1, p1

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    iget-object v0, p0, Lcom/xingbook/paint/a/a;->a:Landroid/graphics/Paint;

    invoke-virtual {v0, p2}, Landroid/graphics/Paint;->setColor(I)V

    iput p1, p0, Lcom/xingbook/paint/a/a;->d:I

    iput-object p3, p0, Lcom/xingbook/paint/a/a;->e:Landroid/graphics/Paint$Style;

    iget-object v0, p0, Lcom/xingbook/paint/a/a;->a:Landroid/graphics/Paint;

    invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setDither(Z)V

    iget-object v0, p0, Lcom/xingbook/paint/a/a;->a:Landroid/graphics/Paint;

    invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    iget-object v0, p0, Lcom/xingbook/paint/a/a;->a:Landroid/graphics/Paint;

    invoke-virtual {v0, p3}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    iget-object v0, p0, Lcom/xingbook/paint/a/a;->a:Landroid/graphics/Paint;

    sget-object v1, Landroid/graphics/Paint$Join;->ROUND:Landroid/graphics/Paint$Join;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeJoin(Landroid/graphics/Paint$Join;)V

    iget-object v0, p0, Lcom/xingbook/paint/a/a;->a:Landroid/graphics/Paint;

    sget-object v1, Landroid/graphics/Paint$Cap;->ROUND:Landroid/graphics/Paint$Cap;

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeCap(Landroid/graphics/Paint$Cap;)V

    return-void
.end method

.method public a(Landroid/graphics/Canvas;)V
    .locals 2

    if-eqz p1, :cond_0

    iget-object v0, p0, Lcom/xingbook/paint/a/a;->b:Lcom/xingbook/paint/c/b;

    iget v1, p0, Lcom/xingbook/paint/a/a;->f:F

    iput v1, v0, Lcom/xingbook/paint/c/b;->c:F

    iget-object v0, p0, Lcom/xingbook/paint/a/a;->b:Lcom/xingbook/paint/c/b;

    iget v1, p0, Lcom/xingbook/paint/a/a;->g:F

    iput v1, v0, Lcom/xingbook/paint/c/b;->d:F

    iget-object v0, p0, Lcom/xingbook/paint/a/a;->c:Lcom/xingbook/paint/a/a/d;

    iget-object v1, p0, Lcom/xingbook/paint/a/a;->a:Landroid/graphics/Paint;

    invoke-interface {v0, p1, v1}, Lcom/xingbook/paint/a/a/d;->a(Landroid/graphics/Canvas;Landroid/graphics/Paint;)V

    :cond_0
    return-void
.end method

.method public a(Lcom/xingbook/paint/a/a/d;)V
    .locals 0

    iput-object p1, p0, Lcom/xingbook/paint/a/a;->c:Lcom/xingbook/paint/a/a/d;

    return-void
.end method

.method public b()Lcom/xingbook/paint/c/b;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/paint/a/a;->b:Lcom/xingbook/paint/c/b;

    return-object v0
.end method

.method public b(FF)V
    .locals 1

    invoke-direct {p0, p1, p2}, Lcom/xingbook/paint/a/a;->f(FF)Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-direct {p0, p1, p2}, Lcom/xingbook/paint/a/a;->g(FF)V

    invoke-direct {p0, p1, p2}, Lcom/xingbook/paint/a/a;->e(FF)V

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/xingbook/paint/a/a;->i:Z

    :cond_0
    return-void
.end method

.method public c(FF)V
    .locals 1

    iget-object v0, p0, Lcom/xingbook/paint/a/a;->h:Landroid/graphics/Path;

    invoke-virtual {v0, p1, p2}, Landroid/graphics/Path;->lineTo(FF)V

    return-void
.end method

.method public c()Z
    .locals 1

    iget-boolean v0, p0, Lcom/xingbook/paint/a/a;->i:Z

    return v0
.end method
